Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ReNaSS new earthquake api behavior #602

Merged
merged 4 commits into from
Feb 26, 2021
Merged

Conversation

norecords
Copy link
Contributor

@norecords norecords commented Feb 25, 2021

Modified ReNaSS network asked on issue #561 (comment)

I add if system_locale == "fr_FR": statement to grab French description and url to corresponding event
else it's in English

@norecords
Copy link
Contributor Author

That need some commit before merging it.

@steflp
Copy link

steflp commented Feb 25, 2021

Hello back
I modify manually the belchertown.py file.
but the url is not good ont the website ;-( ....
you can see it here : [https://meteo-pontscorff.fr/data-weewx/FROGGIT/belchertown/]
image

@norecords
Copy link
Contributor Author

@steflp you haven't modified the 2nd part where json data parsed..
please look at https://github.com/poblabs/weewx-belchertown/pull/602/files

Best regards

@norecords
Copy link
Contributor Author

norecords commented Feb 25, 2021

from math import cos, pi

lat = 43.487950
long = 6.079865

radiusInKm = 300

kmInLongitudeDegree = 111.320 * cos( lat / 180.0 * pi)

deltaLat = radiusInKm / 111.1
deltaLong = radiusInKm / kmInLongitudeDegree

minLat = lat - deltaLat
maxLat = lat + deltaLat
minLong = long - deltaLong
maxLong = long + deltaLong

print(minLat, maxLat, minLong, maxLong)

thats make good results

@norecords
Copy link
Contributor Author

Need to preg all locales fr_* to show description and link in French

@norecords
Copy link
Contributor Author

@poblabs that's fine for me, everything works as expected.

@poblabs
Copy link
Owner

poblabs commented Feb 26, 2021

@norecords Ready for merge?

@norecords
Copy link
Contributor Author

@poblabs yes it's ready

@poblabs poblabs merged commit bdcfeda into poblabs:master Feb 26, 2021
@steflp
Copy link

steflp commented Feb 26, 2021

Hello back,

its seems all ok but .... what does it mean this distance : 433.1 km N ????
image

I live near the town LORIENT ( 60 kms from Vannes in, Britany) and what is it this distance 433 km ?
I dont really understand ...

Perhaps I ve forgotten something in the code ...

(dont forget , i must force unit 'km' in the file)
around line 1060

distance_unit = converter.group_unitdict["group_distance"]
distance_unit = 'km'

Best regards
Stephane

et Bonsoir de la Bretagne !

@poblabs
Copy link
Owner

poblabs commented Feb 26, 2021

This is the distance from your station the earthquake happened.

So this earthquake was 433.1 km NORTH of your station

@steflp
Copy link

steflp commented Feb 26, 2021

it s not possible !
I live at about 60 kms !
image

@poblabs
Copy link
Owner

poblabs commented Feb 26, 2021

This is driving 60km right?

The earthquake is line-of-sight distance

@steflp
Copy link

steflp commented Feb 26, 2021

yes 60 kms driving ...
I ve tried with another point and it seems more better now ...
I will test for a few days ...
Thanks :)

@norecords
Copy link
Contributor Author

@steflp what point do you use ??
can you paste your code, please

@steflp
Copy link

steflp commented Feb 26, 2021

lat= 43.82
long= -3.42
yes I can :)
I rename the file in .txt
belchertown.txt

@norecords
Copy link
Contributor Author

norecords commented Feb 26, 2021

@steflp your town should be
47.836
-3.403
Kenavo

@steflp
Copy link

steflp commented Feb 26, 2021

hello back I m very confused !

i dont know how my locator number change ! perhaps when I put my new parameters in my config files ( I ve two stations, so with 2 services , with 2 config files.

Now all is correct ! the last earthquake is 46.6 km !

@poblabs the script now work fine ! it was my lat and long in my weewx config file : 47.836 not 43.82 :)
@norecords good job !

[off topic] : is it possible to insert SHOM like this :
https://services.data.shom.fr/oceano/render/html/widget?duration=4&delta-date=0&spot=LORIENT&utc=1&lang=fr
( it seems , the service is not free)

Thanks a lot ;) fort all

Stephane

@norecords
Copy link
Contributor Author

[off topic] : is it possible to insert SHOM like this :
https://services.data.shom.fr/oceano/render/html/widget?duration=4&delta-date=0&spot=LORIENT&utc=1&lang=fr
( it seems , the service is not free)

You may open new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants